package com.iking.housekeeping.entity.elderly;

import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotBlank;
import com.iking.housekeeping.httpbean.elderlyreq.HttpElderlyReq;
import com.iking.housekeeping.util.UUIDUtil;


/**
 * 老人
 * 
 * @author: gf
 * @date: 2018年4月18日 下午12:09:16
 */
public class Elderly {
	/**
	 * 老人ID
	 */
    private String fId;

    /**
     * 姓名
     */
    @NotBlank(message = "老人姓名不能为空")
    private String fName;

    /**
     * 年龄
     */
    @NotNull(message = "老人年龄不能为空")
    private Integer fAge;

    /**
     * 性别
     */
    @NotBlank(message = "老人性别不能为空")
    private String fGender;
    
    /**
     * 身份证号
     */
    @NotBlank(message = "身份证不能为空！")
    private String fCardId;

    /**
     * 电话
     */
    @NotBlank(message = "老人电话不能为空")
    @Size(max=11,message="电话长度不能超过11位！" )
    private String fPhone;

    /**
     * 详细地址
     */
    @NotBlank(message = "老人详细地址不能为空")
    private String fAddress;

    /**
     * 街办社区内容
     */
    private String fStreetCommunity;
    
    /**
     * 备注
     */
    private String fRemarks;
    
    /**
     * 服务内容id
     */
    private String fContentid;
    
    /**
     * 服务内容
     */
    private String fContent;

    /**
     * 服务人员ID
     */
    @NotBlank(message = "服务人员不能为空！")
    private String fServiceStaffId;

    /**
     * 历史服务次数
     */
    private Integer fServiceTimes;

    /**
     * 剩余次数
     */
    private Integer fSurplusTimes;

    /**
     * 是否删除
     */
    private Boolean fIsDelete;

    /**
     * 创建时间
     */
    private Date fGmtCreat;

    /**
     * 修改时间
     */
    private Date fGmtModified;
    
    public Elderly() {
		this.fIsDelete = false;
		this.fId = UUIDUtil.getUUID();
    }
    
    public Elderly(HttpElderlyReq httpElderlyReq) {
    	this();
    	if(httpElderlyReq.getfId() != null && !"".equals(httpElderlyReq.getfId())) {
    		this.fId = httpElderlyReq.getfId();
    	}
    	this.fName = httpElderlyReq.getfName().trim();
    	this.fPhone = httpElderlyReq.getfPhone();
    	this.fGender = (httpElderlyReq.getfGender());
    	this.fPhone=(httpElderlyReq.getfPhone());
    	this.fCardId=(httpElderlyReq.getfCardId());
		this.fAddress=(httpElderlyReq.getfAddress());
		this.fContentid=(httpElderlyReq.getfContentId());
		this.fContent=(httpElderlyReq.getfContent());
		this.fStreetCommunity=(httpElderlyReq.getfStreetCommunity());
		this.fAge=(httpElderlyReq.getfAge());
		this.fRemarks=(httpElderlyReq.getfRemarks());
		this.fServiceStaffId=(httpElderlyReq.getfServiceStaffId());
		this.fSurplusTimes=(httpElderlyReq.getfSurplusTimes());
		
    }
    public Elderly(String fServiceStaffId) {
    	this.fServiceStaffId = fServiceStaffId;
    }
	public String getfId() {
		return fId;
	}

	public String getfName() {
		return fName;
	}

	public Integer getfAge() {
		return fAge;
	}

	public String getfGender() {
		return fGender;
	}

	public String getfCardId() {
		return fCardId;
	}

	public String getfPhone() {
		return fPhone;
	}

	public String getfAddress() {
		return fAddress;
	}

	public String getfStreetCommunity() {
		return fStreetCommunity;
	}

	public String getfRemarks() {
		return fRemarks;
	}

	public String getfContentid() {
		return fContentid;
	}

	public String getfContent() {
		return fContent;
	}

	public String getfServiceStaffId() {
		return fServiceStaffId;
	}

	public Integer getfServiceTimes() {
		return fServiceTimes;
	}

	public Integer getfSurplusTimes() {
		return fSurplusTimes;
	}

	public Boolean getfIsDelete() {
		return fIsDelete;
	}

	public Date getfGmtCreat() {
		return fGmtCreat;
	}

	public Date getfGmtModified() {
		return fGmtModified;
	}

	public void setfId(String fId) {
		this.fId = fId;
	}

	public void setfName(String fName) {
		this.fName = fName;
	}

	public void setfAge(Integer fAge) {
		this.fAge = fAge;
	}

	public void setfGender(String fGender) {
		this.fGender = fGender;
	}

	public void setfCardId(String fCardId) {
		this.fCardId = fCardId;
	}

	public void setfPhone(String fPhone) {
		this.fPhone = fPhone;
	}

	public void setfAddress(String fAddress) {
		this.fAddress = fAddress;
	}

	public void setfStreetCommunity(String fStreetCommunity) {
		this.fStreetCommunity = fStreetCommunity;
	}

	public void setfRemarks(String fRemarks) {
		this.fRemarks = fRemarks;
	}

	public void setfContentid(String fContentid) {
		this.fContentid = fContentid;
	}

	public void setfContent(String fContent) {
		this.fContent = fContent;
	}

	public void setfServiceStaffId(String fServiceStaffId) {
		this.fServiceStaffId = fServiceStaffId;
	}

	public void setfServiceTimes(Integer fServiceTimes) {
		this.fServiceTimes = fServiceTimes;
	}

	public void setfSurplusTimes(Integer fSurplusTimes) {
		this.fSurplusTimes = fSurplusTimes;
	}

	public void setfIsDelete(Boolean fIsDelete) {
		this.fIsDelete = fIsDelete;
	}

	public void setfGmtCreat(Date fGmtCreat) {
		this.fGmtCreat = fGmtCreat;
	}

	public void setfGmtModified(Date fGmtModified) {
		this.fGmtModified = fGmtModified;
	}

	@Override
	public String toString() {
		return "Elderly [fId=" + fId + ", fName=" + fName + ", fAge=" + fAge + ", fGender=" + fGender + ", fCardId="
				+ fCardId + ", fPhone=" + fPhone + ", fAddress=" + fAddress + ", fStreetCommunity=" + fStreetCommunity
				+ ", fRemarks=" + fRemarks + ", fContentid=" + fContentid + ", fContent=" + fContent
				+ ", fServiceStaffId=" + fServiceStaffId + ", fServiceTimes=" + fServiceTimes + ", fSurplusTimes="
				+ fSurplusTimes + ", fIsDelete=" + fIsDelete + ", fGmtCreat=" + fGmtCreat + ", fGmtModified="
				+ fGmtModified + "]";
	}

	
}